﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PluginsAPI {
	/// <summary>
	/// Interfejs 'INetworkPlugin' zawiera strukturę wymaganą dla wtyczek sieciowych.
	/// </summary>
	public interface INetworkPlugin : IGlobalPlugin {
		/// <summary>
		/// 
		/// </summary>
		ContactsAPI.IContacts Contacts { get; }
		/// <summary>
		/// 
		/// </summary>
		List<ILog> Logs { get; }

		/// <summary>
		/// 
		/// </summary>
		string Login { get; set; }
		/// <summary>
		/// 
		/// </summary>
		string Password { get; set; }
		/// <summary>
		/// 
		/// </summary>
		string Server { get; set; }
		/// <summary>
		/// 
		/// </summary>
		int Port { get; set; }
		/// <summary>
		/// 
		/// </summary>
		bool AutoLogin { get; set; }
		/// <summary>
		/// 
		/// </summary>
		string Desc { get; set; }
		/// <summary>
		/// 
		/// </summary>
		ConnectionStatus Status { get; set; }

		/// <summary>
		/// 
		/// </summary>
		void LogIn();
		/// <summary>
		/// 
		/// </summary>
		void LogOut();
		/// <summary>
		/// 
		/// </summary>
		/// <param name="NewPassword"></param>
		void ChangePassword(string NewPassword);
		/// <summary>
		/// 
		/// </summary>
		/// <param name="To"></param>
		/// <param name="Text"></param>
		void SendMessage(string To, string Text);

		/// <summary>
		/// 
		/// </summary>
		/// <param name="Login"></param>
		/// <param name="Password"></param>
		void Register(string Login, string Password);
		/// <summary>
		/// 
		/// </summary>
		/// <param name="Login"></param>
		/// <param name="Password"></param>
		void Delete(string Login, string Password);
		/// <summary>
		/// 
		/// </summary>
		/// <param name="Mail"></param>
		void RemaindPassword(string Mail);
		/// <summary>
		/// 
		/// </summary>
		/// <param name="Text"></param>
		void FindFriends(string Text);

		/// <summary>
		/// 
		/// </summary>
		event EventHandler StatusChanged;
		/// <summary>
		/// 
		/// </summary>
		event EventHandler DescriptionChanged;
		/// <summary>
		/// 
		/// </summary>
		event EventHandler PasswordChanged;
		/// <summary>
		/// 
		/// </summary>
		event EventHandler Registered;
		/// <summary>
		/// 
		/// </summary>
		event EventHandler Deleted;
		/// <summary>
		/// 
		/// </summary>
		event EventHandler PasswordRemainded;
		/// <summary>
		/// 
		/// </summary>
		event EventHandler FriendsFinded;
		/// <summary>
		/// 
		/// </summary>
		event EventHandler MessageSended;
		/// <summary>
		/// 
		/// </summary>
		event EventHandler MessageRevided;
	}

	/// <summary>
	/// Typ 'ConnectionStatus' zawiera listę statusów połączeń kontaktów jaka jest obsługiwana przez program.
	/// </summary>
	public enum ConnectionStatus : int {
		/// <summary>
		/// Status 'Connected', czyli połączony.
		/// </summary>
		Connected = 4,
		/// <summary>
		/// Status 'FreeForChat', czyli wolny do rozmowy.
		/// </summary>
		FreeForChat = 5,
		/// <summary>
		/// Status 'Away', czyli oddalony.
		/// </summary>
		Away = 3,
		/// <summary>
		/// Status 'XAway', czyli zaraz wracam.
		/// </summary>
		XAway = 2,
		/// <summary>
		/// Status 'DoNotDisturb', czyli nie przeszkadzać.
		/// </summary>
		DoNotDisturb = 1,
		/// <summary>
		/// Status 'Invisible', czyli niewidoczny.
		/// </summary>
		Invisible = 0,
		/// <summary>
		/// Status 'Disconnected', czyli rozłączony.
		/// </summary>
		Disconnected = -1
	}
}